<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Runner::Formatter::BaseFormatter</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Runner::Formatter::BaseFormatter</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter_rb.html">
                vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Baseclass for formatters that implements all required methods as no-ops.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000475">add_example_group</a>&nbsp;&nbsp;
      <a href="#M000484">close</a>&nbsp;&nbsp;
      <a href="#M000481">dump_failure</a>&nbsp;&nbsp;
      <a href="#M000483">dump_pending</a>&nbsp;&nbsp;
      <a href="#M000482">dump_summary</a>&nbsp;&nbsp;
      <a href="#M000478">example_failed</a>&nbsp;&nbsp;
      <a href="#M000477">example_passed</a>&nbsp;&nbsp;
      <a href="#M000479">example_pending</a>&nbsp;&nbsp;
      <a href="#M000476">example_started</a>&nbsp;&nbsp;
      <a href="#M000473">new</a>&nbsp;&nbsp;
      <a href="#M000474">start</a>&nbsp;&nbsp;
      <a href="#M000480">start_dump</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">example_group</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">options</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">where</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000473" class="method-detail">
        <a name="M000473"></a>

        <div class="method-heading">
          <a href="#M000473" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(options, where)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000473-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000473-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 7</span>
 7:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">where</span>)
 8:           <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
 9:           <span class="ruby-ivar">@where</span> = <span class="ruby-identifier">where</span>
10:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000475" class="method-detail">
        <a name="M000475"></a>

        <div class="method-heading">
          <a href="#M000475" class="method-signature">
          <span class="method-name">add_example_group</span><span class="method-args">(example_group)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked at the beginning of the execution of each
example_group. <tt>example_group</tt> is the example_group.
</p>
<p>
The next method to be invoked after this is <a
href="BaseFormatter.html#M000478">example_failed</a> or example_finished
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000475-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000475-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 25</span>
25:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_example_group</span>(<span class="ruby-identifier">example_group</span>)
26:           <span class="ruby-ivar">@example_group</span> = <span class="ruby-identifier">example_group</span>
27:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000484" class="method-detail">
        <a name="M000484"></a>

        <div class="method-heading">
          <a href="#M000484" class="method-signature">
          <span class="method-name">close</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked at the very end. Allows the formatter to clean up,
like closing open streams.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000484-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000484-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 74</span>
74:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
75:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000481" class="method-detail">
        <a name="M000481"></a>

        <div class="method-heading">
          <a href="#M000481" class="method-signature">
          <span class="method-name">dump_failure</span><span class="method-args">(counter, failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Dumps detailed information about an example failure. This method is invoked
for each failed example after all examples have run. <tt>counter</tt> is
the sequence number of the associated example. <tt>failure</tt> is a
Failure object, which contains detailed information about the failure.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000481-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000481-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 62</span>
62:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_failure</span>(<span class="ruby-identifier">counter</span>, <span class="ruby-identifier">failure</span>)
63:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000483" class="method-detail">
        <a name="M000483"></a>

        <div class="method-heading">
          <a href="#M000483" class="method-signature">
          <span class="method-name">dump_pending</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This gets invoked after the summary if option is set to do so.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000483-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000483-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 70</span>
70:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_pending</span>
71:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000482" class="method-detail">
        <a name="M000482"></a>

        <div class="method-heading">
          <a href="#M000482" class="method-signature">
          <span class="method-name">dump_summary</span><span class="method-args">(duration, example_count, failure_count, pending_count)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked after the dumping of examples and failures.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000482-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000482-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 66</span>
66:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_summary</span>(<span class="ruby-identifier">duration</span>, <span class="ruby-identifier">example_count</span>, <span class="ruby-identifier">failure_count</span>, <span class="ruby-identifier">pending_count</span>)
67:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000478" class="method-detail">
        <a name="M000478"></a>

        <div class="method-heading">
          <a href="#M000478" class="method-signature">
          <span class="method-name">example_failed</span><span class="method-args">(example, counter, failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked when an <tt>example</tt> fails, i.e. an exception
occurred inside it (such as a failed should or other exception).
<tt>counter</tt> is the sequence number of the failure (starting at 1) and
<tt>failure</tt> is the associated Failure object.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000478-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000478-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 41</span>
41:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_failed</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">counter</span>, <span class="ruby-identifier">failure</span>)
42:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000477" class="method-detail">
        <a name="M000477"></a>

        <div class="method-heading">
          <a href="#M000477" class="method-signature">
          <span class="method-name">example_passed</span><span class="method-args">(example)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked when an <tt>example</tt> passes.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000477-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000477-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 34</span>
34:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_passed</span>(<span class="ruby-identifier">example</span>)
35:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000479" class="method-detail">
        <a name="M000479"></a>

        <div class="method-heading">
          <a href="#M000479" class="method-signature">
          <span class="method-name">example_pending</span><span class="method-args">(example, message, pending_caller)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked when an example is not yet implemented (i.e. has not
been provided a block), or when an ExamplePendingError is raised.
<tt>message</tt> is the message from the ExamplePendingError, if it exists,
or the default value of &quot;Not Yet Implemented&quot;
<tt>pending_caller</tt> is the file and line number of the spec which has
called the pending method
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000479-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000479-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 50</span>
50:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_pending</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">message</span>, <span class="ruby-identifier">pending_caller</span>)
51:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000476" class="method-detail">
        <a name="M000476"></a>

        <div class="method-heading">
          <a href="#M000476" class="method-signature">
          <span class="method-name">example_started</span><span class="method-args">(example)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked when an <tt>example</tt> starts.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000476-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000476-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 30</span>
30:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_started</span>(<span class="ruby-identifier">example</span>)
31:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000474" class="method-detail">
        <a name="M000474"></a>

        <div class="method-heading">
          <a href="#M000474" class="method-signature">
          <span class="method-name">start</span><span class="method-args">(example_count)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked before any examples are run, right after they have
all been collected. This can be useful for special formatters that need to
provide progress on feedback (graphical ones)
</p>
<p>
This method will only be invoked once, and the next one to be invoked is <a
href="BaseFormatter.html#M000475">add_example_group</a>
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000474-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000474-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 18</span>
18:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">example_count</span>)
19:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000480" class="method-detail">
        <a name="M000480"></a>

        <div class="method-heading">
          <a href="#M000480" class="method-signature">
          <span class="method-name">start_dump</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method is invoked after all of the examples have executed. The next
method to be invoked after this one is <a
href="BaseFormatter.html#M000481">dump_failure</a> (once for each failed
example),
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000480-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000480-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb, line 55</span>
55:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_dump</span>
56:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>